/*
 *         Copyright (c) KUBOTA Corporation and HUDSON SOFT,
 *                  1994, 1995 All Rights Reserved
 *
 *  This software comprises unpublished confidential information of
 *  KUBOTA Corp. and HUDSON SOFT. It may not be used, copied or made 
 *  available to anyone, except in accordance with the license under
 *  which it is furnished.
 */
static char SccsId[] = "@(#)aoroty.c	1.6	9/19/95";
#include <farl.h>
#include <agl.h>

/*
 * オブジェクトをＹ軸回転
 */
void
AGLRotateObjY(object *obj, int angle)
{
     if (angle >= AGLTFuncSize || angle <= 0) return;

     /* 現在のObjToWorld187マトリクスに、Ｙ軸回転を掛ける */
     if (obj->objChanged == -2) {
	  FarlGetRotateY4x4M187(angle, (unsigned short*)obj->objToWorld187);
     } else {
	  FarlSetSrcMatrix((unsigned short*)obj->objToWorld187);
	  FarlRotateY4x4M187(angle);
	  FarlCopyDstToMem4x4((unsigned short*)obj->objToWorld187);
     }

     /* 現在のObjToWorld1015マトリクスに、Ｙ軸回転を掛ける	*/
     if (obj->objChanged < 0) {
	  FarlGetRotateY3x3M1015(angle, (unsigned short*)obj->objToWorld1015);
     } else {
	  FarlSetSrcMatrix3x3((unsigned short*)obj->objToWorld1015);
	  FarlRotateY3x3M1015(angle);
	  FarlCopyDstToMem3x3((unsigned short*)obj->objToWorld1015);
     }
     obj->objChanged = 1;
}
